home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / share / snmp / mib2c-data / mfd-data-set.m2c < prev    next >
Encoding:
Text File  |  2007-02-07  |  7.7 KB  |  225 lines

  1. #############################################################  -*- c -*-
  2. ## generic include for XXX. Do not use directly.
  3. ##
  4. ## $Id: mfd-data-set.m2c,v 1.18 2004/10/08 23:39:17 rstory Exp $
  5. ########################################################################
  6. ## lower conf files get confused with multiple processing types, so
  7. ## set single options
  8. @eval $mfd_data_set_processing_type_save = "$m2c_processing_type"@
  9. @if "$mfd_processing_types" =~ /h/@
  10. @eval $m2c_processing_type = 'h'@
  11. @if $m2c_create_fewer_files != 1@
  12. @   eval $hack = "Id"@
  13. @open ${name}_data_set.h@
  14. /*
  15.  * Note: this file originally auto-generated by mib2c using
  16.  *       version $Revision: 1.18 $ of $RCSfile: mfd-data-set.m2c,v $ 
  17.  *
  18.  * $$hack:$
  19.  */
  20. @eval $m2c_save = "$name"@
  21. @eval $name = "${name}_DATA_SET"@
  22. @include generic-header-top.m2i@
  23. @eval $name = "$m2c_save"@
  24. @end@ // m2c_create_fewer_files
  25. ########################################################################
  26. @if $m2c_mark_boundary == 1@
  27. /** START header generated by $RCSfile: mfd-data-set.m2c,v $ $Revision: 1.18 $ */
  28. @end@
  29. ##
  30. /* *********************************************************************
  31.  * SET function declarations
  32.  */
  33.  
  34. /* *********************************************************************
  35.  * SET Table declarations
  36.  */
  37. @foreach $table table@
  38. @    include m2c_setup_table.m2i@
  39. @    if $m2c_table_settable == 0@
  40. @        next@ # skip to next table
  41. @    end@
  42. @    include details-table.m2i@
  43. @    foreach $node externalindex@
  44. @        include m2c_setup_node.m2i@
  45.     int ${context}_${node}_check_index( ${context}_rowreq_ctx *rowreq_ctx ); /* external */
  46. @    end@ # foreach externalindex
  47. @    foreach $node internalindex@
  48. @        include m2c_setup_node.m2i@
  49. int ${node}_check_index( ${context}_rowreq_ctx *rowreq_ctx ); /* internal */
  50. @    end@ # foreach internalindex
  51.  
  52. @    include parent-set.m2i@
  53.  
  54. @    foreach $node nonindex@
  55. @        include m2c_setup_node.m2i@
  56. int ${node}_check_value( ${context}_rowreq_ctx *rowreq_ctx, $m2c_node_param_val);
  57. int ${node}_undo_setup( ${context}_rowreq_ctx *rowreq_ctx );
  58. int ${node}_set( ${context}_rowreq_ctx *rowreq_ctx, $m2c_node_param_val );
  59. int ${node}_undo( ${context}_rowreq_ctx *rowreq_ctx );
  60.  
  61. @    end@ # foreach nonindex
  62.  
  63. int ${context}_check_dependencies(${context}_rowreq_ctx *ctx);
  64. @end@ # foreach table
  65.  
  66. @if $m2c_mark_boundary == 1@
  67. /** END header generated by $RCSfile: mfd-data-set.m2c,v $ $Revision: 1.18 $ */
  68. @end@
  69. @if $m2c_create_fewer_files != 1@
  70. @eval $m2c_save = "$name"@
  71. @eval $name = "${name}_DATA_SET"@
  72. @include generic-header-bottom.m2i@
  73. @eval $name = "$m2c_save"@
  74. @end@ // m2c_create_fewer_files
  75. ######################################################################
  76. @end@ // mfd_processing_types =~ /h/
  77. ######################################################################
  78. ######################################################################
  79. ######################################################################
  80. ##//####################################################################
  81. ##//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  82. ##//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  83. @if "$mfd_processing_types" =~ /c/@
  84. @eval $m2c_processing_type = 'c'@
  85. @if $m2c_create_fewer_files != 1@
  86. @open ${name}_data_set.c@
  87. /*
  88.  * Note: this file originally auto-generated by mib2c using
  89.  *       version $Revision: 1.18 $ of $RCSfile: mfd-data-set.m2c,v $
  90.  *
  91.  * $$hack:$
  92.  *
  93.  */
  94. @include generic-source-includes.m2i@
  95.  
  96. /** @defgroup data_set data_set: Routines to set data
  97.  *
  98.  * These routines are used to set the value for individual objects. The
  99.  * row context is passed, along with the new value.
  100.  * 
  101.  * @{
  102.  */
  103. @end@ // m2c_create_fewer_files
  104. @if $m2c_mark_boundary == 1@
  105. /** START code generated by $RCSfile: mfd-data-set.m2c,v $ $Revision: 1.18 $ */
  106. @end@
  107. ########################################################################
  108. @foreach $table table@
  109. @    include m2c_setup_table.m2i@
  110. @    if $m2c_table_settable == 0@
  111. @        next@ # skip to next table
  112. @    end@
  113. @    include details-table.m2i@
  114. ########################################################################
  115. @        include parent-set.m2i@
  116. ########################################################################
  117. /*
  118.  * TODO:420:r: Implement $context index validation.
  119.  */
  120. @    foreach $node externalindex@
  121. @        include m2c_setup_node.m2i@
  122. @        if $m2c_report_progress == 1@
  123. @           print | |   +-> Processing index $node@
  124. @        end@
  125. @        include details-node.m2i@
  126. @        if $m2c_table_row_creation == 1@
  127. /**
  128.  * check validity of ${node} external index portion
  129.  *
  130.  * NOTE: this is not the place to do any checks for the sanity
  131.  *       of multiple indexes. Those types of checks should be done in the
  132.  *       ${context}_validate_index() function.
  133.  *
  134.  * @retval MFD_SUCCESS   : the incoming value is legal
  135.  * @retval MFD_BAD_VALUE : the incoming value is NOT legal
  136.  */
  137. int
  138. ${context}_${node}_check_index( ${context}_rowreq_ctx *rowreq_ctx )
  139. {
  140.     DEBUGMSGTL(("verbose:${context}:${context}_${node}_check_index","called\n"));
  141.  
  142.     netsnmp_assert(NULL != rowreq_ctx);
  143.  
  144.     /*
  145.      * TODO:424:M: |-> Check $context external index $node.
  146.      * check that index value in the table context (rowreq_ctx)
  147.      * for the external index $node is legal.
  148.      */
  149.  
  150.     return MFD_SUCCESS; /*  external index $node ok */
  151. } /* ${context}_${node}_check_index */
  152.  
  153. @        end@ # m2c_table_row_creation
  154. @    end@ # foreach externalindex
  155. ########################################################################
  156. @  if $m2c_table_row_creation == 1@
  157. @    foreach $node internalindex@
  158. @        include m2c_setup_node.m2i@
  159. @        if $m2c_report_progress == 1@
  160. @           print | |   +-> Processing index $node@
  161. @        end@
  162. @        include details-node.m2i@
  163. /**
  164.  * check validity of ${node} index portion
  165.  *
  166.  * @retval MFD_SUCCESS   : the incoming value is legal
  167.  * @retval MFD_BAD_VALUE : the incoming value is NOT legal
  168.  *
  169.  * @note this is not the place to do any checks for the sanity
  170.  *       of multiple indexes. Those types of checks should be done in the
  171.  *       ${context}_validate_index() function.
  172.  */
  173. int
  174. ${node}_check_index( ${context}_rowreq_ctx *rowreq_ctx )
  175. {
  176.     DEBUGMSGTL(("verbose:${context}:${node}_check_index","called\n"));
  177.  
  178.     netsnmp_assert(NULL != rowreq_ctx);
  179.  
  180.     /*
  181.      * TODO:426:M: |-> Check $context index $node.
  182.      * check that index value in the table context (rowreq_ctx)
  183.      * for $node is legal.
  184.      */
  185.  
  186.     return MFD_SUCCESS; /* $node index ok */
  187. } /* ${node}_check_index */
  188.  
  189. @    end@ # foreach internalindex
  190. @  end@ # m2c_table_row_creation
  191. ########################################################################
  192. /*
  193.  * TODO:440:M: Implement $context node value checks.
  194.  * TODO:450:M: Implement $context undo functions.
  195.  * TODO:460:M: Implement $context set functions.
  196.  * TODO:480:M: Implement $context commit functions.
  197.  */
  198. @    foreach $node nonindex@
  199. @        include m2c_setup_node.m2i@
  200. @        if $node.settable == 0@
  201. @            next@ # skip to next column
  202. @        end@
  203. @        if $m2c_report_progress == 1@
  204. @           print | |   +-> Processing nonindex $node@
  205. @        end@
  206. @        include details-node.m2i@
  207. @        include node-set.m2i@
  208. @    end@ # foreach column
  209. ########################################################################
  210. @    if $m2c_table_dependencies == 1@
  211. @        include parent-dependencies.m2i@
  212. @    end@
  213. ########################################################################
  214. @end@ # foreach table
  215. ##
  216. ########################################################################
  217. /** @} */
  218. @if $m2c_mark_boundary == 1@
  219. /** END code generated by $RCSfile: mfd-data-set.m2c,v $ $Revision: 1.18 $ */
  220. @end@
  221. ########################################################################
  222. @end@ // mfd_processing_type =~ /c/
  223. ## restore original processing types
  224. @eval $m2c_processing_type = "$mfd_data_set_processing_type_save"@
  225.